
Stephanie Orellana
Pycon Chile 2022
> Stephanie Orellana (@sporella)
> Ingeniera Agrónoma y Magister en Recursos Naturales
> Científica de Datos
> PyLadies Valparaíso


![]()




Vectoriales

.shp (shapefile).geojson.csvRaster
![]()
.tif.nc (netcdf).asc (ascii).hdfVectoriales
Raster
Vectoriales
> geopandas
Raster
> xarray
> rasterio
Visualización
> matplotlib
> folium
> plotly
> bokeh
> cartopy
IDE (Infraestructura de datos espaciales)
Webs gubernamentales
NASA / COPERNICUS
Google Earth Engine
Open Street Map
Datos de campo (GPS)
from folium import plugins
from folium.plugins import HeatMap
m = paradas.explore()
paradas['stop_lat'] = paradas['stop_lat'].astype(float)
paradas['stop_lon'] = paradas['stop_lon'].astype(float)
heat_data = [[row['stop_lat'], row['stop_lon']] for index, row in paradas.iterrows()]
heat_data
HeatMap(heat_data).add_to(m)
mPodemos descargar datos desde Open Street Map con el paquete osmnx
import osmnx as ox
lugar = "Renca, Chile"
tags = {'landuse': True}
uso_suelo = ox.geometries_from_place(lugar, tags)
uso_suelo.head()| source | geometry | name | nodes | landuse | operator | plant:method | plant:output:electricity | plant:source | power | start_date | addr:housenumber | addr:street | denomination | ways | type | man_made | ||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| element_type | osmid | |||||||||||||||||
| way | 25291350 | NaN | POLYGON ((-70.73081 -33.40046, -70.73064 -33.4... | NaN | [275503907, 275503908, 275503909, 275503907] | village_green | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN |
| 26409096 | https://generadora.cl/ | POLYGON ((-70.69016 -33.41707, -70.69004 -33.4... | Central Termoeléctrica Renca | [607764617, 621925434, 289338330, 289338012, 2... | industrial | Generadora Metropolitana | combustion | 479 MW | gas;oil | plant | 1962 | NaN | NaN | NaN | NaN | NaN | NaN | |
| 26409384 | NaN | POLYGON ((-70.68475 -33.41905, -70.68359 -33.4... | NaN | [289342010, 289342012, 289342013, 289342014, 2... | industrial | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | |
| 26409392 | NaN | POLYGON ((-70.68144 -33.41881, -70.67846 -33.4... | Megacentro | [289342102, 289342103, 289342104, 289342105, 2... | industrial | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | |
| 26409395 | NaN | POLYGON ((-70.68224 -33.42129, -70.67755 -33.4... | NaN | [289342141, 289342142, 289342143, 289342144, 2... | industrial | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN |
from rasterio.crs import CRS
import cartopy
import matplotlib.pyplot as plt
import xarray as xr
import rioxarray
r = xr.open_rasterio("data/soil_moisture.tif")
crs_utm = CRS.from_string('EPSG:3857')
r2 = r.rio.reproject(crs_utm)
fig, ax = plt.subplots(dpi = 300, figsize=(4, 4),
subplot_kw=dict(projection=cartopy.crs.Mercator()))
r.plot(cbar_kwargs={'label': "Humedad de Suelo [mm]",
"orientation": "horizontal"},
cmap = "PuBuGn")
plt.title("")
plt.axis('off')
plt.show()¡Hagan mapas!
Mapas son una representación en 2d de un mundo en 3d
Sesgos, ética
Calidad de los datos